const HasRequestAuthority = require("./index.js");

//加群邀请
Bot.on('request.group.invite', OnGroupInvite);

/** 邀请加群 */
async function OnGroupInvite(event) {
	const flag = HasRequestAuthority(event.user_id);
	await event.approve(flag);
	await support.SendToAdmins(`收到加群邀请` +
		`\n邀请人昵称:${event.nickname}` +
		`\n邀请人QQ:${event.user_id}` +
		`\n群昵称:${event.group_name}` +
		`\n群号:${event.group_id}` +
		`\n结果:${flag ? "已同意" : "已拒绝"}`);
}
